package com.yishe.controller.wx.caseinfo;

import com.yishe.biz.wx.caseinfo.WxCaseInfoBiz;
import com.yishe.config.ObjectRestResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author : chusifeng
 * @version :
 * @date :Create in 2021/4/22 12:14
 * @description: 用户课程中心
 * @package com.yishe.controller.wx.caseinfo
 * @className WxCaseInfoController
 */
@RequestMapping(value = "/wx/caseinfo")
@RestController
@Slf4j
public class WxCaseInfoController {
    @Resource
    private WxCaseInfoBiz wxCaseInfoBiz;


    @RequestMapping(value = "getWxCaseList",method = RequestMethod.POST)
    public ObjectRestResponse getWxCaseList(@RequestBody Map<String, String> param){
        ObjectRestResponse restResponse = new ObjectRestResponse();
        try {
           restResponse.setData(wxCaseInfoBiz.getCaseList(param));
        } catch (Exception e) {
            log.error("获取课程列表信息失败",e);
            restResponse.setErrorMsg("获取课程列表信息失败");
        }
        return restResponse;
    }

}
